﻿using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.SpreadsheetML.Excel.WorksheetElements
{
    [XmlRoot("conditionalFormatting", Namespace = Constants.ExcelMain)]
    public class ConditionalFormatting : XmlSerializable
    {
        [Optional]
        [XmlAttribute("pivot", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> Pivot { get; set; }

        [Optional]
        [XmlAttribute("sqref", Form = XmlSchemaForm.Qualified)]
        public string SequenceOfReferences { get; set; }

        [XmlElement("cfRule", Namespace = Constants.ExcelMain)]
        public XmlList<CfRule> Rules { get; set; }

        [Optional]
        [XmlElement("extLst", Namespace = Constants.ExcelMain)]
        public ExtensionList ExtensionList { get; set; }

        public ConditionalFormatting()
        {
            Rules = new XmlList<CfRule>();
        }
    }
}
